#ifndef  APP_CMD_UTIL_H
#define  APP_CMD_UTIL_H

#define  CFG_CMD_STATUS       0x00
#define  CFG_CMD_CHANNEL      0x01
#define  CFG_CMD_START        0x02
#define  CFG_CMD_SCAN         0x03
#define  CFG_CMD_WLIST        0x04
#define  CFG_CMD_RESET        0x05
#define  CFG_CMD_CLOSE        0x06
#define  CFG_CMD_ADDR_TABLE   0x09
#define  CFG_CMD_KEY_TABLE    0x0A
#define  CFG_CMD_ADD_GROUP    0x0B
#define  CFG_CMD_DEL_GROUP    0x0C
#define  CFG_CMD_CUR_GROUP    0x0D
#define  CFG_CMD_RECOVER      0x0F
#define  CFG_CMD_DEL_ISTCODE  0x10
#define  CFG_CMD_DEL_ADDR     0x11
#define  CFG_CMD_EZ_MODE      0x12

#define  CFG_CMD_BOOT         0x80
#define  CFG_CMD_PERMIT       0x81
#define  CFG_CMD_NWK_START    0x82
#define  CFG_CMD_SCAN_CNF     0x83
#define  CFG_CMD_NODE_JOIN    0x84
#define  CFG_CMD_DEVICE_JOIN  0x85
#define  CFG_CDM_DELETE       0x86
#define  CFG_CMD_LEAVE_IND    0x87
#define  CFG_CMD_VERIFY_KEY   0x88 
#define  CFG_CMD_JOIN_BIND    0x89
#define  CFG_CMD_IDENTIFY     0x8A
#define  CFG_CMD_DENIED       0x8B
#define  CFG_CMD_DEVICE_ERRO  0x8F

#define  COORD_STA_IDLE       0x00
#define  COORD_STA_NET        0x01
#define  COORD_STA_OPEN       0x02

#define  JOIN_MODE_ERRO       0x00
#define  JOIN_MODE_JOIN       0x01
#define  JOIN_MODE_REJOIN     0x02
#define  JOIN_MODE_TC_REJOIN  0x03

/* Function */
void cmdCfg_CmdOutput(uint8 cmdId, uint8 len, uint8* data);
void cmdCfg_Boot(uint8 boot, uint8 version);
void cmdCfg_CoordStartNotify(uint8 sta, uint8 channel, uint16 panId, uint8 *mac);
void cmdCfg_NodeJoinNotify(uint8* mac, uint16 nodeId, uint16 parent, uint8 mode, uint8 type);
void cmdCfg_DevJoinNotify(bool end, mfgDevSn_t sn, mfgDevAddr_t dev, uint16 profile, uint16 devId, 
                         uint8 inNum, uint16 *inCluster, uint8 outNum, uint16 *outCluster);
void cmdCfg_PermitJoinNotify(uint8 time);
void cmdCfg_LeaveNotify(uint16 nodeId, uint8 *mac, uint16 parent);
void cmdCfg_LeaveInd(NLME_LeaveInd_t ind);
void cmdCfg_KeyVerify( uint8 status, uint8* extAddr );
void cmdCfg_DeviceErro(uint8 *ieee, uint16 nodeId, uint8 ep, uint8 status);
void cmdCfg_Denied( uint8* mac, uint16 parent );
#endif
